package com.jsu.service;

import com.alipay.api.AlipayApiException;
import org.example.model.pay.pojo.AliPay;
import org.example.model.pay.pojo.Payment;
import org.example.model.common.dtos.ResponseResult;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public interface PaymentService {

    ResponseResult update(String tradeNo, String alipayTradeNo);

    ResponseResult createPayment(Payment payment);

    void pay(AliPay aliPay, HttpServletResponse httpResponse) throws AlipayApiException, IOException;

    ResponseResult payNotify(HttpServletRequest request) throws AlipayApiException;

    void toRefund(HttpServletResponse response, Integer paymentId,Float amount) throws IOException;

    ResponseResult paymentList(Integer userId);
}
